<%@ page import="com.dbb.entity.shipment.Shipment" %>



<div class="fieldcontain ${hasErrors(bean: shipmentInstance, field: 'code', 'error')} required">
	<label for="code">
		<g:message code="shipment.code.label" default="Code" />
		<span class="required-indicator">*</span>
	</label>
	<g:textField name="code" required="" value="${shipmentInstance?.code}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: shipmentInstance, field: 'agent', 'error')} ">
	<label for="agent">
		<g:message code="shipment.agent.label" default="Agent" />
		
	</label>
	<g:textField name="agent" value="${shipmentInstance?.agent}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: shipmentInstance, field: 'boatName', 'error')} ">
	<label for="boatName">
		<g:message code="shipment.boatName.label" default="Boat Name" />
		
	</label>
	<g:textField name="boatName" value="${shipmentInstance?.boatName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: shipmentInstance, field: 'containerNo', 'error')} ">
	<label for="containerNo">
		<g:message code="shipment.containerNo.label" default="Container No" />
		
	</label>
	<g:textField name="containerNo" value="${shipmentInstance?.containerNo}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: shipmentInstance, field: 'eTD', 'error')} required">
	<label for="eTD">
		<g:message code="shipment.eTD.label" default="ETD" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="eTD" precision="day"  value="${shipmentInstance?.eTD}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: shipmentInstance, field: 'groups', 'error')} ">
	<label for="groups">
		<g:message code="shipment.groups.label" default="Groups" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${shipmentInstance?.groups?}" var="g">
    <li><g:link controller="groups" action="show" id="${g.id}">${g?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="groups" action="create" params="['shipment.id': shipmentInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'groups.label', default: 'Groups')])}</g:link>
</li>
</ul>

</div>

<div class="fieldcontain ${hasErrors(bean: shipmentInstance, field: 'loadingDate', 'error')} required">
	<label for="loadingDate">
		<g:message code="shipment.loadingDate.label" default="Loading Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="loadingDate" precision="day"  value="${shipmentInstance?.loadingDate}"  />
</div>

